//
//  doubanFunTests.m
//  doubanFunTests
//
//  Created by bing on 16/3/21.
//  Copyright © 2016年 bing. All rights reserved.
//

#import "API.h"
#import "RESTClient.h"
#import <XCTest/XCTest.h>

@interface doubanFunTests : XCTestCase

@end

@implementation doubanFunTests

- (void)setUp {
    [super setUp];
    // Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    [super tearDown];
}

/*!
 app_name: radio_android
 
 version: 100
 
 email: 用户帐号
 
 password: 明文密码
 */
- (void)testExample {
    RESTClient *client = [RESTClient sharedClient];
    NSString *loginURL = [NSString stringWithUTF8String:API_LOGIN];
    NSDictionary *parameters = @{@"app_name":@"radio_android",
                                 @"version":@100,
                                 @"email":@"bing45@yeah.net",
                                 @"password":@"sa340806"
                                 };
    [client method:POST urlString:loginURL parameters:parameters success:^(id responseObject) {
        NSLog(@"1-------");
    } failure:^(NSError *error) {
        NSLog(@"2-------");
    }];
    
}

- (void)testPerformanceExample {
    // This is an example of a performance test case.
    [self measureBlock:^{
        // Put the code you want to measure the time of here.
    }];
}

@end
